<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>123</li>
        <li>123</li>
        <li>123</li>
        <li>123</li>
        <li>123</li>
    </ul>
    <script>
        let lis=document.querySelectorAll('li');
        [...lis].forEach(function(item){
            item.onclick=function(){
                console.log('可以写没有必要');
            }
        })

        //展开数组
        var arr=[1,5,4,8]
        ;var arr2=[3];
        var hebing=[...arr,...arr2]
        console.log(hebing);

        var res=Math.max(...arr);
        console.log(res);


        //伪数组转数组
        function fn(){
            var arr=Array.from(arguments);
            console.log(arr);

            var arr1=[...arguments];
            console.log(arr1);
        }

        fn(1,2,3,4);
    </script>
</body>
</html>